#include "trap.h"
   .set noat
   .globl main
   .text
main:
   li $v0, 0xccddeeff
   li $v1, 0x10
   sllv $t0, $v0, $v1
   sll $t1, $v0, 0x10
   beq $t0, $t1, TEST_LEFT

TEST_RIGHT_A:
   srav $t0, $v0, $v1
   li $at, 0x11ddeeff
   srav $t1, $at, $v1
   xor $t2, $t0, $t1
   addi $t3, $zero, 0xdd
   beq $t2, $t3,  TEST_RIGHT_L

TEST_RIGHT_L:
   srl $t0, $v0, 0x10
   srlv $t1, $v0, $v1
   beq $t0, $t1, TARGET

TEST_LEFT:
   j TEST_RIGHT_A


TARGET:
   HIT_GOOD_TRAP